<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<form action="index.php?admin=introAdmin&do=formaddintro" method="post" enctype="multipart/form-data">
		<table cellspacing="0" border="0" width="995">
			<tr>
				<td width="995" class="title_manager_product">Thêm giới thiệu</td>
			</tr>
		</table>
    	<table class="reference" cellspacing="0" border="1" width="995">
        	<tr>
				<td></td>
				<td>
					<?php
						$intro=$_POST['intro'];
						if(isset($_POST['submit'])){
							if($intro==''){
								echo "<font color=\"#ff0000\">Mời bạn nhập nội dung cho mô tả giới thiệu.</font>";
							}else{
								$query="INSERT INTO introductions(intro) VALUES ('$intro')";
								mysql_query($query);
								echo "Thêm thông tin giới thiệu thành công.";
								echo "<script>window.location='index.php?admin=introAdmin&do=listintro'</script>";
							}	
						}
					?>	
					
				</td>
			</tr>
             <tr>
            	<td width="205" align="right"><b>Mô tả giới thiệu: <font color="#FF0000"> * </font></b></td>
                <td width="700">
                	<textarea name="intro" rows="20"></textarea>
                </td>
            </tr>
            
            <tr>
            	<td></td>
                <td>
                	<input type="submit" name="submit" value="Đăng giới thiệu" />
                	<input type="reset" name="reset" value="Nhập lại" />
					<input type="button" name="Cancel" value="Cancel" onclick="window.location = 'index.php?admin=introAdmin&do=listintro' " /    
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
